package com.lndsnx.consumer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

@Component
public class AckModelChecker {
    @Autowired
    private Environment env;
    String ACK_MODE_PROPERTY = "spring.cloud.stream.rabbit.bindings.greetingInChannel.consumer.acknowledge-mode";

    public boolean isManualAckModel() {
        String ackMode = env.getProperty(ACK_MODE_PROPERTY);
        return "MANUAL".equalsIgnoreCase(ackMode);
    }
}
